/*
 * tbb_sc_method_task.cpp
 *
 *  Created on: Apr 23, 2010
 *      Author: sdaniele
 */

#include "tbb/task.h"
#include "tbb/tbb_thread.h"

#include "sysc/kernel/sc_tbb_thread_task.h"
#include "sysc/kernel/sc_thread_process.h"

#include "sysc/kernel/syscpar_common.h"

#include <iostream>

using namespace tbb;


namespace sc_core {

sc_tbb_thread_task::sc_tbb_thread_task(sc_thread_handle thread, sc_cor_pkg* cor_pkg)
	:m_thread(thread),m_cor_pkg(cor_pkg){}

::tbb::task* sc_tbb_thread_task::execute(){
	m_cor_pkg->yield( m_thread->m_cor_p );
	return NULL;
}

}
